﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Gencode.Gengui.History
{
	public partial class HistoryDialog : Form
	{
		HistoryControler controler;

		public HistoryDialog(HistoryControler controler)
		{
			this.controler = controler;
			InitializeComponent();
			InitializeDialog();
		}

		private void InitializeDialog()
		{
			if (!string.IsNullOrEmpty(controler.Name))
				this.Name = controler.Name;

			historyGrid.DataSource = controler.Data;
		}

		private void btnOK_Click(object sender, EventArgs e)
		{
			this.Close();
		}
	}
}
